
import request from '@/utils/request'
import { json2FormData } from '@/utils'
/**
 * 保存信息
 * @param {string} goodsAttrSpecialIdentification 商品特殊标识
 * @param {string} id  ID (id存在为编辑，不存在为新增)
 * @param {string} roleIds  角色ID(多个用逗号分隔)
 */
export function saveRoleRelation(data) {
  return request({
    url: `/api/v1/productSearchRoleRelation`,
    method: data.id ? 'put' : 'post',
    data
  })
}

/**
 * 删除
 * @param {string} id
 */
export function delRoleRelation(id) {
  return request({
    url: `/api/v1/productSearchRoleRelation/${id}`,
    method: 'delete'
  })
}

/**
 * 获取商品特殊标识的属性值
 */
export function getProductSpecialLabel() {
  return request({
    url: `/api/v1/productSearchRoleRelation/querySpecialLabelItems`,
    method: 'delete'
  })
}
